Skip to content

Conversation

@OliverSherouse
Copy link
Owner

Summary

  • handle corrupted shelve cache by clearing and rebuilding on load
  • add regression test for cache recovery
  • bump version to 1.1.1

Testing

  • uv run pytest

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds resilience to handle corrupted shelve cache files by implementing an automatic recovery mechanism that clears corrupted cache files and rebuilds the cache on load failures.

Key Changes:

  • Added cache corruption recovery with automatic retry logic in get_cache()
  • Implemented _clear_cache_files() helper to remove shelve-related files on corruption
  • Added regression test for cache recovery behavior

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
wbdata/version.py Bumped version from 1.1.0 to 1.1.1 for patch release
wbdata/cache.py Added retry logic to recover from cache corruption by catching pickle/system errors and clearing cache files before rebuild
tests/test_cache.py Added new test verifying cache recovery behavior when corruption is detected

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Contributes to #78

Signed-off-by: Oliver Sherouse <[email protected]>
@OliverSherouse OliverSherouse force-pushed the fix/cache-corruption-78 branch from 65da35b to 6e0a642 Compare December 3, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants